<template>
  <div class="ShowContain">
    <div class="ShowContain-header">
      <div class="title">{{title}}</div>
      <div class="more" v-if="more" @click="handleMore">{{moreDes?moreDes:'更多>'}}</div>
    </div>
    <div class="ShowContain-main">
      <slot></slot>
    </div>
  </div>
</template>

<script>

export default {
  name: 'ShowContain',
  props: {
    moreDes: {
      type: [Boolean, String],
      default: false
    },
    //是否显示【更多】字样
    more: {
      type: Boolean,
      default: false
    },
    //更多的点击事件
    moreClick: {
      type: Function
    },
    //左侧标题
    title: {
      type: String,
      default: ''
    }
  },
  data () {
    return {

    };
  },
  methods: {
    handleMore () {
      if (this.moreClick) {
        this.moreClick(this.title)
      }
    }
  },
}
</script>
<style lang='scss' scoped src="./index.scss" />
